package com.qi.spzx.manager.service.impl;

import com.qi.spzx.manager.mapper.ProductSkuMapper;
import com.qi.spzx.manager.service.ProductSkuService;
import com.qi.spzx.model.entity.product.ProductSku;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description TODO
 * @Author dingchunlin
 * @Date 2024/2/23 19:14
 * @Version 1.0.0
 */
@Service
public class ProductSkuServiceImpl implements ProductSkuService {

    @Autowired
    private ProductSkuMapper productSkuMapper;

    @Override
    public List<ProductSku> selectByProductId(Long productId) {
        List<ProductSku> productSkuList = productSkuMapper.selectByProductId(productId);
        return productSkuList;
    }

    @Override
    public void save(ProductSku productSku) {
        productSkuMapper.save(productSku);
    }

    @Override
    public void updateById(ProductSku productSku) {
        productSkuMapper.updateById(productSku);
    }

    @Override
    public void deleteByProductId(Long id) {
        productSkuMapper.deleteByProductId(id);
    }
}
